ComponentOne Bitmap for WinForms
C1.Win.C1DX.4.8 Assembly / C1.Util.DX.Direct2D Namespace / Bitmap Class / CopyFromMemory Method / CopyFromMemory<T>(T[],Int32) Method
The data to copy.
The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

In This Topic
    CopyFromMemory<T>(T[],Int32) Method
    In This Topic
    Copies the specified region from memory into the current bitmap.
    Syntax
    'Declaration
     
    Public Overloads Sub CopyFromMemory(Of T As {New, Struct})( _
       ByVal memory() As T, _
       Optional ByVal pitch As System.Integer _
    ) 
    public void CopyFromMemory<T>( 
       T[] memory,
       System.int pitch
    )
    where T: new(), struct

    Parameters

    memory
    The data to copy.
    pitch
    The stride, or pitch, of the source bitmap stored in srcData. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.

    Type Parameters

    T

    Return Value

    If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
    Remarks
    This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion; the two bitmap formats should match. Passing this method invalid input, such as an invalid destination rectangle, can produce unpredictable results, such as a distorted image or device failure. Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing System.Int32 and tag state will be returned at the next call to {{EndDraw}} or {{Flush}}.
    See Also